I hate MatLab...

Kinja'd!!! "Sportwägen, Driver Of The Red Sportwagen" (sportwagen)
04/27/2015 at 18:06 • Filed to: None

Kinja'd!!!0 Kinja'd!!! 42

I can’t wrap my head around how to use it... can someone please help me? It just makes no sense with what it is telling me to do (or not telling me in this case)


DISCUSSION (42)


Kinja'd!!! Arch Duke Maxyenko, Shit Talk Extraordinaire > Sportwägen, Driver Of The Red Sportwagen
04/27/2015 at 18:08

Kinja'd!!!2

Sounds like MatLab is working 100%.


Kinja'd!!! Sportwägen, Driver Of The Red Sportwagen > Arch Duke Maxyenko, Shit Talk Extraordinaire
04/27/2015 at 18:09

Kinja'd!!!0

of course -_-


Kinja'd!!! Twingo Tamer - About to descend into project car hell. > Sportwägen, Driver Of The Red Sportwagen
04/27/2015 at 18:10

Kinja'd!!!0

I have Vietnam flashbacks to a 2nd year degree assignment where I had to use MATLAB whenever anyone mentions it. I hate that program with a passion. What are you trying to do with it?


Kinja'd!!! TheHondaBro > Sportwägen, Driver Of The Red Sportwagen
04/27/2015 at 18:13

Kinja'd!!!0

Never used MatLab. We use WeBWorK.


Kinja'd!!! Arch Duke Maxyenko, Shit Talk Extraordinaire > Sportwägen, Driver Of The Red Sportwagen
04/27/2015 at 18:13

Kinja'd!!!3

MatLab: "Our programmers look forward to joining the Kinja development crew!"


Kinja'd!!! Sportwägen, Driver Of The Red Sportwagen > Twingo Tamer - About to descend into project car hell.
04/27/2015 at 18:14

Kinja'd!!!0

Our stupid (not really, I’m just pissed at him) programming teacher decided it would be a good idea to go from learning Python for the past 6-7 months to learning MatLab for the last 3 weeks before we graduate... WHAT THE HELL?!

Anyways, I’m trying to figure out how to separate out the odd (1,1 1,3 1,5...) indices from the evens (1,2 1,4 1,6...) but I can’t figure out how :(


Kinja'd!!! Sportwägen, Driver Of The Red Sportwagen > TheHondaBro
04/27/2015 at 18:14

Kinja'd!!!0

Could be worse...


Kinja'd!!! Sportwägen, Driver Of The Red Sportwagen > Arch Duke Maxyenko, Shit Talk Extraordinaire
04/27/2015 at 18:15

Kinja'd!!!0

They were rejected for being too bad


Kinja'd!!! nFamousCJ - Keeper of Stringbean, Gengars and a Deezul > Sportwägen, Driver Of The Red Sportwagen
04/27/2015 at 18:16

Kinja'd!!!4

Matlab, where x=3 does not equal 3=x nor does .5 = 1/2


Kinja'd!!! Axial > Sportwägen, Driver Of The Red Sportwagen
04/27/2015 at 18:16

Kinja'd!!!0

What do you want to do after you separate them? Are you performing a function on that indexed value immediately or do you want to store them for later use?


Kinja'd!!! tromoly > Sportwägen, Driver Of The Red Sportwagen
04/27/2015 at 18:16

Kinja'd!!!0

I’ve written an acceleration simulation for automobiles in MATLAB, I may be able to help. What are you having problems with?


Kinja'd!!! Twingo Tamer - About to descend into project car hell. > Sportwägen, Driver Of The Red Sportwagen
04/27/2015 at 18:18

Kinja'd!!!0

Ah I’m afraid I can’t really help you with that, I just used it to run iterations of complex equations. There was a forum I used when doing my assignment that people helped me on, I forget the name now but google around and you should find it.


Kinja'd!!! Sportwägen, Driver Of The Red Sportwagen > Axial
04/27/2015 at 18:19

Kinja'd!!!0

IDK to be honest... this is like some foreign language to me

What I am honestly worried about though is something like what happened to Bandit happening to me (even though I’m only in high school and its not really for a grade on my college transcript)


Kinja'd!!! Sportwägen, Driver Of The Red Sportwagen > tromoly
04/27/2015 at 18:19

Kinja'd!!!0

Figuring out how to pull certain numbers out of a matrix


Kinja'd!!! Sportwägen, Driver Of The Red Sportwagen > Twingo Tamer - About to descend into project car hell.
04/27/2015 at 18:20

Kinja'd!!!0

was it StackOverflow?


Kinja'd!!! Twingo Tamer - About to descend into project car hell. > Sportwägen, Driver Of The Red Sportwagen
04/27/2015 at 18:22

Kinja'd!!!0

I don’t think so.


Kinja'd!!! Sportwägen, Driver Of The Red Sportwagen > Twingo Tamer - About to descend into project car hell.
04/27/2015 at 18:24

Kinja'd!!!0

What ever, this shit SUCKS... I am wishing that I had never taken programming now... even though I enjoyed it for the past 8.5 months :(


Kinja'd!!! Twingo Tamer - About to descend into project car hell. > Sportwägen, Driver Of The Red Sportwagen
04/27/2015 at 18:26

Kinja'd!!!0

I became rather angry with my MATLAB assignment too, it was my worst mark in that module. I’m sure you’ll manage though, if you do programming. I’m a mechanical engineer so anything with code is completely alien to me.


Kinja'd!!! Sportwägen, Driver Of The Red Sportwagen > Twingo Tamer - About to descend into project car hell.
04/27/2015 at 18:27

Kinja'd!!!1

I’m not even very good with Python to be honest... :(

This is just flat out confusing and is making me want to punch a hole in something


Kinja'd!!! Axial > Sportwägen, Driver Of The Red Sportwagen
04/27/2015 at 18:28

Kinja'd!!!0

MatLab’s scripting language uses a format and syntax very similar to Python.

What you need to do is use a for-loop that runs for the size of the array, and divide your iterator by 2 each run, checking for a remainder . No remainder, then the index is even and the value associated with it can be operated on according to whatever parameters you’ve set for the values indexed to even numbers.

For a multi-dimensional array, you’ll have to define for me what makes it even. If it were me, I’d index them all to a single-dimension array and go from there.


Kinja'd!!! Sportwägen, Driver Of The Red Sportwagen > Axial
04/27/2015 at 18:30

Kinja'd!!!0

so like a:

for size(array):

size/2

something like that?

what about the edit window and functions?


Kinja'd!!! Twingo Tamer - About to descend into project car hell. > Sportwägen, Driver Of The Red Sportwagen
04/27/2015 at 18:31

Kinja'd!!!0

I once put a pen through a calculator screen because I was angry at an assignment. I’ve almost completed my degree now. The frustration passes eventually and you get by, just take a break and come back to it with a fresh head, or even better work alongside some classmates so you can pool your skills.


Kinja'd!!! Sportwägen, Driver Of The Red Sportwagen > Twingo Tamer - About to descend into project car hell.
04/27/2015 at 18:34

Kinja'd!!!0

The issue is that the assignment was due today... and nobody else got it done either :/

The teacher is doing a shit job teaching us like he is being paid to do...


Kinja'd!!! Twingo Tamer - About to descend into project car hell. > Sportwägen, Driver Of The Red Sportwagen
04/27/2015 at 18:36

Kinja'd!!!0

That sucks, I had a lecturer like that last year. A lot of people failed his exam, including me...


Kinja'd!!! Sportwägen, Driver Of The Red Sportwagen > Twingo Tamer - About to descend into project car hell.
04/27/2015 at 18:40

Kinja'd!!!0

I emailed him, maybe he’ll actually respond... I also have a precalculus test in his class tomorrow :/ gotta get that review done... ugh


Kinja'd!!! Twingo Tamer - About to descend into project car hell. > Sportwägen, Driver Of The Red Sportwagen
04/27/2015 at 18:45

Kinja'd!!!0

Hopefully he cuts you a break if everyone else is struggling.


Kinja'd!!! Sportwägen, Driver Of The Red Sportwagen > Twingo Tamer - About to descend into project car hell.
04/27/2015 at 18:47

Kinja'd!!!0

I doubt it... everyone except one or two other is struggling

Then again one is a national merit scholar... (smartest of the smart people)


Kinja'd!!! Twingo Tamer - About to descend into project car hell. > Sportwägen, Driver Of The Red Sportwagen
04/27/2015 at 18:54

Kinja'd!!!0

Surely he’ll have to make some allowances if everyone is failing his class though.


Kinja'd!!! Sportwägen, Driver Of The Red Sportwagen > Twingo Tamer - About to descend into project car hell.
04/27/2015 at 18:58

Kinja'd!!!1

No, not a college class and no one is failing right now

Its this fucking assignment that is causing so many issues... he JUST assigned a MatLab unit and started teaching it 2 weeks from graduation (so no one has any motivation left)


Kinja'd!!! Dr_Watson > Sportwägen, Driver Of The Red Sportwagen
04/27/2015 at 19:00

Kinja'd!!!0

it could be worse... Matlab is confusing, but Minitab is completely fucking obtuse.


Kinja'd!!! Sportwägen, Driver Of The Red Sportwagen > Dr_Watson
04/27/2015 at 19:29

Kinja'd!!!0

MatLab is impossible to learn after learning Python ONLY for 7+ months


Kinja'd!!! MrDakka > Sportwägen, Driver Of The Red Sportwagen
04/27/2015 at 19:33

Kinja'd!!!0

Hey cheer up, it could have been Fortran. :p


Kinja'd!!! tromoly > Sportwägen, Driver Of The Red Sportwagen
04/27/2015 at 19:35

Kinja'd!!!0

Gotcha, see this link for a full explanation: http://www.mathworks.com/company/newsle…

Basically, as an example if you have a simple single-row matrix in the variable “x”, you could call the second value by using “x(1)“, fourth value by “x(4)“, and so on.

If you have a multi-row matrix again using “x” as the variable, you call by using (row:column) as the operator. If you want the second row, first column number you call “x(2,1)“, first row fourth column called by “x(1,4)“, and so on.

Calling a certain range in rows and columns is explained by the link provided, I don’t have as much experience with doing that so I’ll let the link explain it.

Hope that helps.


Kinja'd!!! Sportwägen, Driver Of The Red Sportwagen > MrDakka
04/27/2015 at 19:37

Kinja'd!!!0

WHAT THE HELL ARE THESE THINGS YOU SPEAK OF?!


Kinja'd!!! Sportwägen, Driver Of The Red Sportwagen > tromoly
04/27/2015 at 19:38

Kinja'd!!!0

I just think I’m going to wait until tomorrow and get some help directly from the teacher... I’m already pissed enough as it is. I don’t want to get more frustrated and just smash something out of anger :P


Kinja'd!!! MrDakka > Sportwägen, Driver Of The Red Sportwagen
04/27/2015 at 19:41

Kinja'd!!!0

Eldritch code spoken of only in hushed whispers, rumored to control space and time. Unfortunately, those capable of understanding it are deemed insane and dangerous to themselves and others.


Kinja'd!!! Sportwägen, Driver Of The Red Sportwagen > MrDakka
04/27/2015 at 19:44

Kinja'd!!!0

:(


Kinja'd!!! Denver Is Stuck In The 90s > Sportwägen, Driver Of The Red Sportwagen
04/27/2015 at 20:24

Kinja'd!!!0

My brother knows, hes around here somewhere. comment on one of his posts if you have to


Kinja'd!!! Axial > Sportwägen, Driver Of The Red Sportwagen
04/27/2015 at 21:26

Kinja'd!!!0

Well, here’s a sample I just threw together, written in MatLab code . It expires in one day, so look at it now.

The outputs are 5 for evenSum and 5 for oddSum, as they should be. Play around with it.

Edit: Holy FUCK Kinja has an absolutely garbage editor. Even the Code function doesn’t work right. What good is it if I can’t show whitespace!? Click the Pastebin link above.


Kinja'd!!! Sportwägen, Driver Of The Red Sportwagen > Axial
04/27/2015 at 22:13

Kinja'd!!!0

Neat, I’ll look over it in a bit (I’m busy right now)


Kinja'd!!! Twingo Tamer - About to descend into project car hell. > Sportwägen, Driver Of The Red Sportwagen
04/27/2015 at 22:14

Kinja'd!!!0

Yeah everyone here runs out of fucks about a month before term finishes.


Kinja'd!!! Sportwägen, Driver Of The Red Sportwagen > Twingo Tamer - About to descend into project car hell.
04/27/2015 at 23:01

Kinja'd!!!0

We ran out of fucks to give at about mid February (and we graduate May 17th)

The term is “Senioritis”